#include <iostream>

struct Student
{
    std::string name;
    int age;
    int score;

    Student() : name("xiaoming") {}
    Student(std::string name, int age, int score) : age(age), score(score){
        this->name = name;
    }

    ~Student() {
        std::cout << this->name << std::endl;
        std::cout << "析构函数" << std::endl;
    }
};


int main(int argc, char const *argv[])
{
    Student lucy = Student("lucy", 18, 100);
    Student lutong99{};
    Student* sam = new Student("Sam", 18, 100);
    delete sam;

    return 0;
}
